//
//  TrainController.h
//  TrainT1
//  $Id: TrainController.h 43 2010-06-07 08:49:24Z qiaolun $
//
//  Created by qiaolun on 6/4/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "TrainQuery.h"
#import "TrainDetailController.h"



@interface TrainController : NSObject {
	IBOutlet NSTextField *from;
	IBOutlet NSTextField *to;
	IBOutlet NSComboBox *station;
	IBOutlet NSTextField *train_code;
	
	IBOutlet NSTableView *table_view;
	
	IBOutlet NSWindow *mainWindow;

	TrainQuery *trainQuery;
	
	NSArray *tableData;
	
	/* auto-completion data */
	NSArray *allStations;
	NSArray *allTrains;

	IBOutlet TrainDetailController *trainDetailController;
}

@property (retain) NSArray *tableData;
@property (retain) NSArray *allStations;
@property (retain) NSArray *allTrains;

- (IBAction) tableViewAction:(id)sender;

- (IBAction) searchFromTo:(id)sender;
- (IBAction) searchStation:(id)sender;
- (IBAction) searchTrainCode:(id)sender;

@end
